﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;


public partial class jinhuojia : System.Web.UI.Page
{
    private static string sqlconn = System.Configuration.ConfigurationManager.AppSettings["sqlcon"].ToString().Trim();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnjia_Click(object sender, EventArgs e)
    {
        string dh = txtdh.Text.Trim();
        string time = txttime.Text.Trim();
        string yid = txtyid.Text.Trim();
        string yname = txtyname.Text.Trim();
        string number = txtyshu.Text.Trim();
        string price = txtypri.Text.Trim();
        string youxiaoqi = txtyouxiaoqi.Text.Trim();
        string gid = txtgid.Text.Trim();
        string tname = txttname.Text.Trim();
        string ze = txtze.Text.Trim();
        users us = new users();
        us.dh = dh;
        us.time = time;
        us.id = yid;
        us.name = yname;
        us.number = number;
        us.price = price;
        us.youxiaoqi = youxiaoqi;
        us.ze = ze;
        us.gid = gid;
        us.tname = tname;

        int result = us.addjinhuo(us);
        if (result > 0)
        {
            Response.Write("<script>alert(\"添加订单成功！\")</script>");

        }
    }
    protected void btncin_Click(object sender, EventArgs e)
    {
        txtdh.Text = null;
        txttime.Text = null;
        txtyid.Text = null;
        txtyname.Text = null;
        txtyshu.Text = null;
        txtypri.Text = null;
        txtyouxiaoqi.Text = null;
        txtgid.Text = null;
        txttname.Text = null;
        txtze.Text = null;
       
    }
}